{extend name="public/base" /}

{block name="title"} 后臺首頁--<?php echo '<?=$title?>'?>{/block}

{block name="style"}{/block}

{block name="main"}


<!-- /section:basics/sidebar -->

    <div class="page-content">

        <!-- /section:settings.box -->
        <div class="page-content-area">

            <div class="row">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->


                    <div class="page-header">
                        <h1>
                            <?php echo '<?=$title?>'?>
                        </h1>
                    </div>


                    <div class="row">
                        <div class="col-sm-12">
                            <!-- #section:elements.tab -->
                            <div class="tabbable">
                                <ul class="nav nav-tabs" id="myTab">
                                    <li class="active">
                                        <a href="/<?=$routeName?>_lst">
                                            <i class="fa fa-align-justify bigger-120"></i>
                                            <?=$config['tableCnName']?>列表
                                        </a>
                                    </li>

                                    <li class="">
                                        <a href="/<?=$routeName?>_add">
                                            <i class="fa fa-plus green bigger-120"></i>
                                            新增<?=$config['tableCnName']?>
                                        </a>
                                    </li>
                                </ul>

                            </div>

                            <!-- /section:elements.tab -->
                        </div><!-- /.col -->

                    </div>

                    <div class="hr hr-18 dotted hr-double" style="border:none;"></div>

                    <div class="row">
                        <div class="col-xs-12">
                            <form action="" method="get">
                            <table width="100%" class="CSSearchTbl" style="border:none;" cellpadding="0" cellspacing="0">
                                <tr>
                                    <?php if(!empty($config['search'])){ foreach($config['search'] as $k=>$v){?>
                                    <?php if($v['type'] == 'text'){?>
                                    <td class="left"><?=$v['comment']?>：</td>
                                    <td class="right"><input type="text" size="16" name="<?=$v['field']?>" /></td>
                                    <?php }else if($v['type'] == 'select'){?>
                                    <td class="left"><?=$v['comment']?>：</td>
                                    <td class="right">
                                        <select name="<?=$v['field']?>">
                                            <option>未送出</option>
                                            <option>审核中</option>
                                        </select>
                                    </td>
                                    <?php } ?>
                                    <?php }} ?>
                                </tr>

                                <tr>
                                    <td class="right" colspan="2">
                                        <button type="submit" class="btn btn-primary pull-left col-sm-12 tbl-search" data-dismiss="modal" style="width:100px;" >
                                            开始搜索
                                            <i class="ace-icon fa fa-search"></i>
                                        </button>
                                    </td>
                                </tr>
                            </table>
                            </form>
                        </div>
                    </div>

                    <div class="hr hr-18 dotted hr-double" style="border:none;"></div>

                    <div class="row">
                        <div class="col-xs-12">
                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>ID</th>
                            <?php foreach($config['form_fields'] as $k=>$v){?>
                                <?php if($v['is_visible'] == 1){?>
                                    <th><?=$v['text']?></th>
                                <?php } ?>
                            <?php } ?>
                                    <th class="hidden-480">操作</th>
                                </tr>
                                </thead>

                                <tbody>
                            <?php echo '<?php if(!empty($data)){foreach($data as $k=>$v): ?>'?>
                                <tr>
                                    <td><?php echo '<?php echo $v[\''.$pri_key.'\']?>' ?></td>

                                <?php foreach($config['form_fields'] as $k=>$v): ?>
                                    <?php if($v['is_visible'] == 1){?>
                                        <td class="hidden-480"><?php echo '<?php echo $v[\''.$k.'\']?>'?></td>
                                    <?php } ?>
                                <?php endforeach;?>

                                    <td>
                                        <div class="hidden-sm hidden-xs btn-group">

                                            <a class="btn btn-xs btn-success" title="查看" onclick="C.frame('<?php echo '<?php echo \''.$routeName.'_view?'.$pri_key.'=\'.$v[\''.$pri_key.'\']?>'?>');">
                                                <i class="ace-icon fa fa-eye bigger-120 "></i>
                                            </a>

                                            <a href="<?php echo '<?php echo \''.$routeName.'_edit?'.$pri_key.'=\'.$v[\''.$pri_key.'\']?>'?>" class="btn btn-xs btn-info" title="编辑">
                                                <i class="ace-icon fa fa-pencil bigger-120"></i>
                                            </a>

                                            <a href="javascript:C.confirm('<?php echo '<?php echo \''.$routeName.'_del?'.$pri_key.'=\'.$v[\''.$pri_key.'\']?>'?>');"  class="btn btn-xs btn-danger" title="删除">
                                                <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                            </a>

                                        </div>
                                    </td>
                                </tr>

                            <?php echo '<?php endforeach; } ?>'?>


                                </tbody>
                            </table>
                        </div><!-- /.span -->
                    </div><!-- /.row -->


                </div><!-- /.col -->
            </div><!-- /.row -->
        </div><!-- /.page-content-area -->
    </div><!-- /.page-content -->



<div id="dialog-message"  style="overflow-x:hidden!important;overflow: hidden;" class="hide" ></div>

{/block}

{block name="js"}
<script>

</script>
{/block}